package br.com.SLLM;

import br.com.control.R;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class Tela_principal extends Activity implements OnClickListener {

	private Button btnlista_laudos, btn_sair;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.tela_principal);

		ChamarBotao();
	}

	public void ChamarBotao() {
		btnlista_laudos = (Button) findViewById(R.id.BtnLista_Laudos);
		btn_sair = (Button) findViewById(R.id.BtnSair);
		btn_sair.setOnClickListener(this);
		btnlista_laudos.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		if (v == btnlista_laudos) {
			Intent intent = new Intent(this, TelaLista_laudo.class);
			startActivity(intent);
			finish();
		}
		if (v == btn_sair) {
			finish();
			
		}

	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.tela_principal, menu);
		return true;
	}

}
